import { NextResponse } from 'next/server';
import { SDWebUILauncher } from '@/lib/launcher';

const launcher = SDWebUILauncher.getInstance();

export async function GET() {
  try {
    const status = launcher.getStatus();
    return NextResponse.json({ 
      status: 'ok', 
      timestamp: new Date().toISOString(),
      sdWebUI: status
    });
  } catch (error: any) {
    return NextResponse.json(
      { 
        status: 'error',
        error: error.message 
      },
      { status: 500 }
    );
  }
}
